import 'package:xreader/generated/json/base/json_convert_content.dart';
import 'package:xreader/model/t_book_cont_entity.dart';
import 'package:xreader/model/fan_yi_entity.dart';


TBookContEntity $TBookContEntityFromJson(Map<String, dynamic> json) {
	final TBookContEntity tBookContEntity = TBookContEntity();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		tBookContEntity.id = id;
	}
	final String? btitle = jsonConvert.convert<String>(json['btitle']);
	if (btitle != null) {
		tBookContEntity.btitle = btitle;
	}
	final String? phk = jsonConvert.convert<String>(json['phk']);
	if (phk != null) {
		tBookContEntity.phk = phk;
	}
	final int? bookid = jsonConvert.convert<int>(json['bookid']);
	if (bookid != null) {
		tBookContEntity.bookid = bookid;
	}
	final int? border = jsonConvert.convert<int>(json['border']);
	if (border != null) {
		tBookContEntity.border = border;
	}
	final int? bnum = jsonConvert.convert<int>(json['bnum']);
	if (bnum != null) {
		tBookContEntity.bnum = bnum;
	}
	final int? bcontNum = jsonConvert.convert<int>(json['bcontNum']);
	if (bcontNum != null) {
		tBookContEntity.bcontNum = bcontNum;
	}
	final int? fanyisNum = jsonConvert.convert<int>(json['fanyisNum']);
	if (fanyisNum != null) {
		tBookContEntity.fanyisNum = fanyisNum;
	}
	final List<FanYiEntity>? bcontList = jsonConvert.convertListNotNull<FanYiEntity>(json['bcontList']);
	if (bcontList != null) {
		tBookContEntity.bcontList = bcontList;
	}
	final String? bcontstr = jsonConvert.convert<String>(json['bcontstr']);
	if (bcontstr != null) {
		tBookContEntity.bcontstr = bcontstr;
	}
	final int? tmsec = jsonConvert.convert<int>(json['tmsec']);
	if (tmsec != null) {
		tBookContEntity.tmsec = tmsec;
	}
	return tBookContEntity;
}

Map<String, dynamic> $TBookContEntityToJson(TBookContEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['btitle'] = entity.btitle;
	data['phk'] = entity.phk;
	data['bookid'] = entity.bookid;
	data['border'] = entity.border;
	data['bnum'] = entity.bnum;
	data['bcontNum'] = entity.bcontNum;
	data['fanyisNum'] = entity.fanyisNum;
	data['bcontList'] =  entity.bcontList?.map((v) => v.toJson()).toList();
	data['bcontstr'] = entity.bcontstr;
	data['tmsec'] = entity.tmsec;
	return data;
}